package com.example.mapper.medical;

import com.example.model.entity.medical.Office;
import com.example.model.vo.OfficeVO;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 操作Office相关数据接口
*/
public interface OfficeMapper {

    /**
      * 新增
    */
    int insert(Office Office);

    /**
      * 删除
    */
    int deleteById(Integer id);

    /**
      * 修改
    */
    int updateById(Office Office);

    /**
      * 根据ID查询
    */
    Office selectById(Integer id);

    /**
      * 查询所有
    */
    List<OfficeVO> selectAll(Office Office);

    @Select("select * from office where officeName = #{officeName}")
    Office selectByUsername(String officeName);

    @Select("select * from office where departmentId = #{departmentId}")
    List<OfficeVO> selectByInfo(String departmentId);
}
